<?php
function utf8($n) {
        return (utf8_encode($n));
        }

$data = json_decode(file_get_contents("php://input"),true);
$recu='test serveur ok Reception ';
foreach ($data as $key => $value){
$recu=$recu.' cle-> '.$key.' valeur :'.$value;
            }
$recu=$recu.' transfert ';

 
$identifiant = $data['ID'];


$host="goshka.fr";                  
$username="ppe4";       
$password="ppe4";               
$db_name="neochevbook";                


$sql = 'INSERT INTO utilisateurs values("'.$identifiant.'")';   
$result = mysql_query($sql);

$json = array(); 
if(mysql_num_rows($result)){
while($row=mysql_fetch_assoc($result)){ 
$json[]=array_map('utf8',$row);  
}
}
mysql_close($con);
$recu = $recu.json_encode($json);
echo $recu;




?>